package org.ellwood.core.common.event;

import lombok.RequiredArgsConstructor;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.stereotype.Component;

/**
 * @ProjectName: ellwood-boot-pro
 * @PackageName: org.ellwood.core.common.event
 * @ClassName: EventPublisher
 * @Description: // 事件发布服务器
 * @Author: Ellwood
 * @CreateDate: 2024/6/18 - 上午11:08
 * @Version: V1.0.0
 */
@Component
@RequiredArgsConstructor
public class EventPublisher {

    private final ApplicationEventPublisher eventPublisher;

    public void publish(BaseEvent<?> event){
        eventPublisher.publishEvent(event);
    }

}
